Quick Start

This section provides a quick walk-through a simple example that will help you to start using SWMM5-EA.

SWMM5 Network

There is a simple SWMM5 network named simple.inp that we use for this walk-through. It consists of three conduits (see figure below) three junctions and a free outfall.

The network

SWMM5 network simple.inp

The two upstream nodes have a (constant) inflow of 0.25 m^3/s.

Optimization problem

The objective is to find the least cost design, that does not cause flooding in the network. The total cost of building with circular conduits used in the network are given by

c=1000 (D^{0.8})

In drainage system design it is customary to have downstream conduits at least as large as any of the upstream nodes. So, in this example we have to maintain the following constraint:

D_{C3}\geq \mbox{max}(D_{C1},D_{C2})

Where D_{Cn} is the diameter of conduit Cn.

Steps

  1. Create a new project (Project > New Project)
  2. Save the Project in some directory ( Project > Save As, In the dialog select an empty direcotory)
  3. Load the SWMM network file to this project (File > Load SWMM file, Navigate to the sub-directory named simple in examples directory (in windows this is typically <program files>\\SWMM5-EA\\examples\\simple) and select simple.inp file. SWMM5-EA will copy the file to your project directory and load it.)
  4. Edit the project parameters ( Project > Edit ) and make sure the values in the dialog as same as the ones shown in the figure below. Click OK.
  5. Open the SWMM5 file and insert the place holders (File> Insert Slots). The value of Geometry 1 (Diameter of conduit according to SWMM convention) is 1 m for each of the three conduits C1\mbox{,}C2\mbox{ and }C3. Replace these values with @!v1!@\mbox{,}@!v2!@\mbox{ and } @!max(v1,v2)+v3!@. The first two are simple place holders allowing SWMM5-EA to change those values. But the third involves some trickery. By specifying @!max(v1,v2)+v3!@, we ensure that the diameter of the conduit C3 is always larger than the larger of those of two conduits C1 and C2. See Figure below. Click OK.
  6. Now Initialize the optimization (Optimization>Initialize the optimization). Check the Output and Errors and Warnings panes for any signs of trouble. If no errors warnings..
  7. Run the optimization (Optimization>Run Optimization)
  8. Now thee convergence plot will be drawn on the main plot window. See Figure Below.
  9. SWMM5-EA saves the best performing solution from each generation in the output directory, as a SWMM5 file. These files can be opened from SWMM5 Desktop and run, to examine their performance.
The Project Parameters

The Project Parameters

Place holders

Place-holders

Running optimization

Running Optimization

Understanding the Results

After completiung the simulation run, examine the sub-direcoty output under the prject directory. There are number of files like

Best_of_gen_000.inp
Best_of_gen_001.inp
Best_of_gen_002.inp
Best_of_gen_003.inp
Best_of_gen_004.inp
...
...
Best_of_gen_099.inp

Each of these files are legitimate SWMM input files (can be opened and run using SWMM desktop) and represent the best solution from each generation.

Best result from the first generation.

Best result from the first generation.

The following table shows the best result of some selected generations:

Generation Number D_1 m D_2 m D_3 m Flooding
0 0.69 0.55 0.76 No
10 0.57 0.52 0.74 No
40 0.57 0.52 0.74 No
70 0.57 0.52 0.74 No

Since this is a rather simple optimization, the convergence is really fast. After 10th generation, the best solution changes little.